Re: [GENERAL] date_part bug?

Поиск
Список
Период
Сортировка
От Herouth Maoz
Тема Re: [GENERAL] date_part bug?
Дата
Msg-id l03110700b2a2741852ab@[147.233.159.109]
обсуждение исходный текст
Ответ на date_part bug?  (Tim Williams <williams@ugsolutions.com>)
Ответы Some obstacles
Список pgsql-general
At 20:00 +0200 on 17/12/98, Tim Williams wrote:


> I see the following results:
>
> m1|m2
> --+--
>  5| 6
> (1 row)
>
> Why is date_part giving different results for date and date_time?  Why
> is it wrong for 'date'? Anybody seen this before?

Basically, it's a timezone problem.

When you give bare dates, they give you midnight of that same day. My guess
is that since date does not contain the timezone information contained in
datetime, it somehow forgets daylight saving time in its interpretation
into the internal format or out of it.

What's your timezone? Have you tried changing it to see whether it affects
the result?

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma



В списке pgsql-general по дате отправления:

Предыдущее
От: Miguel Valero
Дата:
Сообщение: Problems starting postmaster
Следующее
От: Kaare Rasmussen
Дата:
Сообщение: Some obstacles